﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuralStock.Tools
{
    public class StatisticsManager
    {
        int allPredictions;
        int goodPredictions;

        public StatisticsManager()
        {
            allPredictions = 0;
            goodPredictions = 0;
        }

        public void AddSuccess()
        {
            allPredictions++;
            goodPredictions++;
        }

        public void AddFail()
        {
            allPredictions++;
        }

        public decimal Calculate()
        {
            return (decimal) goodPredictions / allPredictions;
        }
    }
}
